import request from '/@/utils/request';
import { AxiosRequestConfig } from 'axios';

//================================================================
// 获取算法列表 分页查询
export const QueryPageList = (params?: object) => {
	return request({
		url: '/ITS/Algorithm/QueryPageList',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 算法 新增
export const Add = (params?: object) => {
	return request({
		url: '/ITS/Algorithm/Add',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 算法 编辑
export const Update = (params?: object) => {
	return request({
		url: '/ITS/Algorithm/Update',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 算法 删除
export const Delete = (params?: object) => {
	return request({
		url: '/ITS/Algorithm/Delete',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

//算法 详情
export const Get = (params?: object) => {
	return request({
		url: '/ITS/Algorithm/Get',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

//算法 包含绑定关系详情
export const GetDetailWithBind = (params?: object) => {
	return request({
		url: '/ITS/Algorithm/GetDetailWithBind',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 获取下拉列表
export const DropDownList = (params?: object) => {
	return request({
		url: '/ITS/Algorithm/DropDownList',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 获取最近一个月算法调用统计（按模型名称和版本分组统计）
export const GetRecentMonthAlgorithmLogStatistics = (params?: object) => {
	return request({
		url: '/ITS/Algorithm/GetRecentMonthAlgorithmLogStatistics',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}